package dao

import "my_music_server/model"

type UserDao struct {
}

func (userDao *UserDao) GetUserCountByUserName(userName string) (count int,err error)  {
	DB.Where("user_name=?", userName).Find(&model.User{}).Count(&count)
	return
}

func (userDao *UserDao) Insert(user *model.User) (err error)  {
	DB.Create(user)
	return
}

